package com.seaside.park.mapper.cabinet;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.seaside.park.bean.cabinet.CabinetCell;
import com.seaside.park.bean.cabinet.vo.CellVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CabinetCellMapper extends BaseMapper<CabinetCell> {
    @Select("select cc.cell_no,cc.open_pwd,good_name from cabinet_cell as cc , good_info as gi,deposit_info as di where cc.good_id = gi.good_id and cc.despoit_id=di.deposit_id and cc.used=1 and di.deposit_cabitnet=#{cabinetId} and di.user_openid=#{userOpenId}")
    List<CellVO> getCellsByUserOpenId(int cabinetId, String userOpenId);
}
